package com.yyh1;

public class Student extends School{
    //属性
    //学习内容
    private String content;
    //无参构造方法
    public Student(String name, int age) {
        super(name, age);
    }
    //有参构造方法
    public Student(String name, int age, String content) {
        super(name, age);
        this.content = content;
    }

    //getter and setter
    public String getText1() {
        return content;
    }
    public void setText1(String text1) {
        this.content = content;
    }
    //行为
    public void listen(){
        System.out.println("年龄为"+age+"的"+name+"正在专心致志的听着"+content+"的知识");
    }
}
